package com.example.demo_spring.ioc_di.spring.depInterface;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class MyHello {
//    @Autowired
//    @Qualifier("myCustomer2")
//    @Qualifier("createMyCustomer3WithName")
//    @Resource
    @Resource(name = "createMyCustomer3WithName")
    private ICustomer mCustomer;

    public void toCustomer()
    {
        mCustomer.setName("My Li Si");
        mCustomer.displayInfo();
    }

}
